/*
 * wptextbrowser.h
 *
 *  Created on: 2.12.2009
 *      Author: jkal
 */

#ifndef WPTEXTBROWSER_H_
#define WPTEXTBROWSER_H_

#include <QTextBrowser>

class WPScrollArea;

class WPTextBrowser : public QTextBrowser
{
    Q_OBJECT

public:
    WPTextBrowser(QWidget *aParent = 0);
    ~WPTextBrowser();

public:
    void addScrollArea(WPScrollArea* aScrollArea);

public:
    void mousePressEvent(QMouseEvent *ev);
    void mouseMoveEvent(QMouseEvent *ev);
    void mouseReleaseEvent(QMouseEvent *ev);

    void keyPressEvent(QKeyEvent *e);

private:
    WPScrollArea* iScrollArea;

    bool mousePressed;
    QPoint lastMousePoint;
};

#endif //WPTEXTBROWSER_H_
